package com.yaorange.mapper;

import com.yaorange.entity.Article;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;

/**
 * @description:
 * @company: yaorange
 * @author: CorJ
 * @version: 1.0
 * @create: 2021-11-29 19:40
 */
public interface ArticleMapper {

    List<Article> selectAll(HashMap hashMap);

    int insertArticle(Article article);

    Article selectArticleById(Integer id);

    int updateById(Article article);

    int deleteById(Integer id);

    int selectNumById(Integer id);

    void updateNumById(@Param("num") Integer num, @Param("id") Integer id);

    void updateNumAddById(@Param("articleId") Integer articleId, @Param("applyNum") Integer applyNum);
}
